﻿
using System;
using System.Collections;
using System.Drawing;


namespace SharppiFlowEditor.models
{
    /*
 * The event arguments in a diagram change event.
 */
    public class FlowChartEventArgs : EventArgs
    {
        private AbstractNode node;
        private Connector conn;
        private bool last;



        public FlowChartEventArgs()
        {
        }

        public FlowChartEventArgs(bool last)
        {
            this.last = last;
        }
        /*
         * Create the arguments for node manipulation event.
         *  node = the node changed
         *  last = is this the last change in a series of changes
         */
        public FlowChartEventArgs(AbstractNode n, bool last)
        {
            node = n;
            conn = null;
            this.last = last;
        }

        /*
         * Create the arguments for connector manipulation event.
         *  node = the connector changed
         *  last = is this the last change in a series of changes
         */
        public FlowChartEventArgs(Connector c, bool last)
        {
            conn = c;
            node = null;
            this.last = last;
        }

        /*
         * Get the changed node.
         */
        public AbstractNode NodeChanged
        {
            get { return node; }
        }

        /*
         * Get the changed connector.
         */
        public Connector ConnectorChanged
        {
            get { return conn; }
        }

        /*
         * Is this the last change in a series of changes?
         */
        public bool LastChange
        {
            get { return last; }
        }
    }
}